﻿namespace EmbeddedSharp.Core {

    /// <summary>
    /// Abstract expression parser factory
    /// </summary>
    public abstract class AbstractExpressionParserFactory : IExpressionParserFactory {

        /// <summary>
        /// Create a new expression parser, with no variables inside
        /// </summary>
        /// <param name="expr">the expression</param>
        /// <returns>the expression parser</returns>
        public abstract ExpressionParser CreateParser(string expr);

        /// <summary>
        /// Create a new expression parser, requires a context to supply variable information
        /// </summary>
        /// <param name="expr">the expression</param>
        /// <param name="context">the context</param>
        /// <returns>the expression parser</returns>
        public abstract ExpressionParser CreateParser(string expr, object context);
    }
}
